import { Module, forwardRef } from '@nestjs/common'
import { TaskService } from './task.service'
import { TaskController } from './task.controller'
import { Task } from 'src/entity/Task'
import { TypeOrmModule } from '@nestjs/typeorm'
import { PurchaseModule } from 'src/purchase/purchase.module'
import { Purchase } from 'src/entity/Purchase'
import { BudgetModule } from 'src/budget/budget.module'
import { Budget } from 'src/entity/Budget'
import { Receive } from 'src/entity/Receive'
import { Asset } from 'src/entity/Asset'
import { Scrap } from 'src/entity/Scrap'
import { Allocate } from 'src/entity/Allocate'
import { Borrow } from 'src/entity/Borrow'
import { InStore } from 'src/entity/InStore'
import { Easter } from 'src/entity/Easter'

@Module({
  imports: [
    forwardRef(() => BudgetModule),
    forwardRef(() => PurchaseModule),
    TypeOrmModule.forFeature([
      Task,
      Budget,
      Purchase,
      Receive,
      Asset,
      Scrap,
      Easter,
      Allocate,
      Borrow,
      InStore
    ]),
  ],
  controllers: [TaskController],
  providers: [TaskService],
  exports: [TaskService],
})
export class TaskModule { }
